import 'package:bilibili/http/model/home_mo.dart';
import 'package:bilibili/http/request/home_request.dart';
import 'package:hi_net/hi_net.dart';

class HomeDao {
  static get(String categoryName, {int pageIndex = 1, int pageSize = 1}) async {
    var homeRequest = HomeRequest();
    homeRequest.pathParams = categoryName;
    homeRequest.add("pageIndex", pageIndex);
    homeRequest.add("pageSize", pageSize);
    var result = await HiNet.getInstance().fire(homeRequest);
    return HomeMo.fromJson(result["data"]);
  }
}
